<?php
/**
 * Created by PhpStorm.
 * User: xudongsheng
 * Date: 2017/9/12
 * Time: 下午9:18
 */

namespace app\admin\model;
use think\Model;
//use traits\model\SoftDelete;

class Article extends Model
{

//    use SoftDelete;  // 不使用 软删除 垃圾

    protected $autoWriteTimestamp   =   true;
    protected $deleteTime = 'recycle';

    public function columnModel(){
        return $this->hasOne('column','column_id','column_id')->field('name,model_id,column_id,alias');
    }

    public function getCreateTimeAttr($value){
        return $value;
    }
}